<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<link rel="stylesheet" type="text/css" href="../template/css.css"
		media="all" />
	<title>QueroTeto</title>
</h:head>
<h:body>
	<div id="corpo">
		<ui:include src="/template/topo.xhtml" />
		<ui:include src="/template/menu.xhtml" />
		<div id="slide"></div>
		<div id="conteudo">
			<div id="centro">

				
				<h:form>
					<p:carousel rendered="#{usuarioBean.listaVazia != true}" 
						id="basicCarousel" value="#{usuarioBean.list}" var="usuario"
						itemStyleClass="carItem" numVisible="2">
						<f:facet name="header">  
			            	Usuário 
			    		</f:facet>
						<h:panelGrid columns="1" width="300px" cellpadding="2px"
							cellspacing="3px">

							<p:graphicImage id="imagem"
									value="/inquilino/perfil/#{perfilBean.perfil.email}.jpg"
									width="100px" height="130px" />
							
								<h:outputText value="Nome: #{usuario.apelido}" />
								<h:outputText value="Cidade: #{usuario.cidade}" />
								<p:commandButton value="Detalhes"
									action="#{usuarioBean.detalhes}">
									<f:param name="email" value="#{usuario.email}" />
								</p:commandButton>
						</h:panelGrid>
					</p:carousel>
				</h:form>

				<h:outputText value="Nenhum usuário atende a esses parâmetros"
					rendered="#{usuarioBean.listaVazia}" />
			</div>
			<div id="direita" align="center">
<p:tabView effect="clip" effectDuration="normal">
					<p:tab title="Imóveis">
						<h:form>

							<h:panelGrid columns="2">

								<p:outputLabel value="Cidade " for="cidade" />
								<p:selectOneMenu value="#{imovelBean.imovel.cidade}" id="cidade">
									<f:selectItem itemLabel="Todas as Cidades" itemValue="" />
									<f:selectItems value="#{imovelBean.dao.listCidades}" />
								</p:selectOneMenu>
								<p:outputLabel value="Quartos " for="quartos" />
								<p:selectOneMenu value="#{imovelBean.imovel.qtdQuartos}"
									id="quartos">
									<f:selectItem itemLabel="Todos" itemValue="0" />
									<f:selectItem itemLabel="1" itemValue="1" />
									<f:selectItem itemLabel="2" itemValue="2" />
									<f:selectItem itemLabel="3" itemValue="3" />
									<f:selectItem itemLabel="4" itemValue="4" />
									<f:selectItem itemLabel="5" itemValue="5" />
									<f:selectItem itemLabel="6" itemValue="6" />
									<f:selectItem itemLabel="7" itemValue="7" />
									<f:selectItem itemLabel="8" itemValue="8" />
									<f:selectItem itemLabel="9" itemValue="9" />
								</p:selectOneMenu>
								<p:outputLabel value="Banheiros " for="banheiros" />
								<p:selectOneMenu value="#{imovelBean.imovel.qtdBanheiros}"
									id="banheiros">
									<f:selectItem itemLabel="Todos" itemValue="0" />
									<f:selectItem itemLabel="1" itemValue="1" />
									<f:selectItem itemLabel="2" itemValue="2" />
									<f:selectItem itemLabel="3" itemValue="3" />
									<f:selectItem itemLabel="4" itemValue="4" />
									<f:selectItem itemLabel="5" itemValue="5" />
									<f:selectItem itemLabel="6" itemValue="6" />
									<f:selectItem itemLabel="7" itemValue="7" />
									<f:selectItem itemLabel="8" itemValue="8" />
									<f:selectItem itemLabel="9" itemValue="9" />
								</p:selectOneMenu>
								<p:outputLabel value="Garagem " for="garagem" />
								<p:selectBooleanCheckbox id="garagem"
									value="#{imovelBean.imovel.garagem}" />
							</h:panelGrid>
							<br />
							<p:tooltip for="pesquisar"
								value="Campos de preenchimento não obrigatório para efetuar a pesquisa"
								showEffect="fade" hideEffect="fade" />
							<p:commandButton value="Pesquisar"
								action="#{imovelBean.pesquisaImovel}" id="pesquisar" />
						</h:form>
					</p:tab>
					<p:tab title="Pessoas">

						<h:form>

							<p:panelGrid columns="2">
								<p:outputLabel value="Sexo" for="sexo" />
								<p:selectOneMenu value="#{usuarioBean.usuario.sexo}" id="sexo">
									<f:selectItem itemLabel="Todos" itemValue="" />
									<f:selectItem itemLabel="M" itemValue="M" />
									<f:selectItem itemLabel="F" itemValue="F" />
								</p:selectOneMenu>

								<p:outputLabel value="Bebe" for="bebe" />
								<p:selectOneMenu value="#{usuarioBean.usuario.perfil.bebe}"
									id="bebe">
									<f:selectItem itemLabel="Sim" itemValue="true" />
									<f:selectItem itemLabel="Não" itemValue="false" />
								</p:selectOneMenu>

								<p:outputLabel value="Fuma" for="fuma" />
								<p:selectOneMenu value="#{usuarioBean.usuario.perfil.fuma}"
									id="fuma">
									<f:selectItem itemLabel="Sim" itemValue="true" />
									<f:selectItem itemLabel="Não" itemValue="false" />
								</p:selectOneMenu>

								<p:outputLabel value="Cidade" for="cidade" />
								<p:selectOneMenu value="#{usuarioBean.usuario.cidade}"
									id="cidade">
									<f:selectItem itemLabel="Todos" itemValue="" />
									<f:selectItems value="#{usuarioBean.cidades}" />
								</p:selectOneMenu>
								<p:commandButton value="Pesquisar" action="#{usuarioBean.pesquisa}"/>

							</p:panelGrid>
						</h:form>

					</p:tab>

				</p:tabView>
				<br />

		</div>
		</div>
		<div id="both" align="center"></div>
		<ui:include src="/template/rodape.xhtml" />
	</div>
</h:body>
</html>